﻿using System.Drawing;
using System.IO;
using System.Windows.Forms;

namespace ExifCleaner {
	class Program {
		static void Main(string[] args) {
			foreach (var path in args) {
				if (string.IsNullOrEmpty(path)) continue;
				var image = new Bitmap(path);
				var newImage = new Bitmap(image.Width, image.Height);
				using (var graphics = Graphics.FromImage(newImage)) {
					graphics.DrawImage(image, 0, 0, newImage.Width, newImage.Height);
				}
				newImage.Save(
					path.Replace(
						Path.GetFileName(path),
						string.Concat(
							Path.GetFileName(path).Replace(Path.GetExtension(path), ""),
							"-ExifRemoved",
							Path.GetExtension(path)
				)));
			}
			foreach (var path in args) {
				if (path == "Show-author")
					MessageBox.Show("constantine.colotiine@live.com", "Связаться с автором", MessageBoxButtons.OK);
			}
		}
	}
}

